package com.base.engine.graphics;

import com.base.engine.error.ColorException;
import com.base.engine.error.VertexException;

public class VertexData2f {

	private Vertex2f vertex ; 
	private Color4f color ; 
	
	public VertexData2f(Vertex2f vertex){
		setVertex(vertex);
		setColor(new Color4f(1.0f,1.0f,1.0f,1.0f));
	}
	public VertexData2f(Vertex2f vertex, Color3f color){
		setVertex(vertex);
		setColor(Color4f.toColor4f(color));
	}
	public VertexData2f(Vertex2f vertex, Color4f color){
		setVertex(vertex);
		setColor(color);
	}

	public Vertex2f getVertex() {
		return vertex;
	}

	public void setVertex(Vertex2f vertex) {
		if(vertex == null) VertexException.NullPointerException(); 
		else this.vertex = vertex;
	}

	public Color4f getColor() {
		return color;
	}

	public void setColor(Color4f color) {
		if(color == null) ColorException.NullPointerException(); 
		this.color = color;
	}
	
	
	
}
